<script setup>
import {
  reactive,
  ref,
  onMounted,
  computed,
  defineModel,
  defineEmits
} from 'vue';
defineProps({
  list: { type: Array },
  modelValue: { type: [Number, String] }
});
const emit = defineEmits(['update:modelValue']);
</script>

<template>
  <el-select
    placeholder="请选择"
    style="width: 240px"
    :modelValue="modelValue"
    @update:modelValue="emit('update:modelValue', $event)"
  >
    <el-option
      v-for="item in list"
      :key="item.id"
      :label="item.label"
      :value="item.value"
    ></el-option>
  </el-select>
</template>

<style lang="scss" scoped></style>
